/**
 * @ClassName: fq
 * @Description: TODO
 * @Author: MaykkStar@163.com
 */

import java.util.Scanner;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;
import java.util.Set;

// 获取字符串中出现次数最多的字符
public class fq {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();
        // 保存到map
        Map<Character, Integer> map = PutInMap(ch);
        getMax(map);
    }

    // 加入字符串到map中
    public static Map<Character, Integer> PutInMap(char[] ch) {
        Map<Character, Integer> map = new HashMap<Character, Integer>();
        for (int i = 0; i < ch.length; i++) {
            if (map.get(ch[i]) != null)
                map.put(ch[i], map.get(ch[i]) + 1);
            else
                map.put(ch[i], 1);
        }
        return map;
    }

    // 获取Map中的value的Max
    public static void getMax(Map<Character, Integer> map) {
        Set<Character> ch = map.keySet();
        Iterator<Character> it = ch.iterator();
        char maxCh = 'a';
        int maxVa = 0;
        while (it.hasNext()) {
            Character c = (Character) it.next();
            if (maxVa < map.get(c)) {
                maxVa = map.get(c);
                maxCh = c;
            }
        }
        System.out.println(maxCh + ":" + maxVa);
    }

}

